package phapp.model.barapp;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

import javacommon.base.BaseEntity;


/**
 * <p> 标题: 会员主信息表, tc_vip_main_info 数据类 POJO
 * <p>Description: DAO层映射到数据类,页面封装数据映射到数据类
 * <p>Copyright: Copyright (c) 2014-10
 * <p>Company: 
 * @author you name
 * @version 1.0
*/

public class VipMain extends BaseEntity {
   
   //date formats
   public static final String FORMAT_CREATE_TIME = DATE_TIME_FORMAT;
   
   //columns START
   /**序列*/
   private java.lang.Integer id;
   /**会员名*/
   private java.lang.String menberName;
   /**会员密码*/
   private java.lang.String menberPass;
   /**手机MIME码*/
   private java.lang.String imei;
   /** 名拼音首字母 */
   private java.lang.String pinyin4j;
   /**昵称*/
   private java.lang.String nickname;
   /**性别:1男,2女*/
   private java.lang.String sex;
   /**心情*/
   private java.lang.String mood;
   /**星座*/
   private java.lang.String constellation;
   /**年龄*/
   private java.lang.String age;
   /** 头象文件:二进制存入表中*/
   private java.lang.String file;
   /** 头象 URL*/
   private java.lang.String elephant;   
   /**积分 - 除废 */
   private java.lang.Integer credit;
   /**玫瑰鲜花数*/
   private java.lang.Integer roses;
   /**登录次数*/
   private java.lang.Integer logincount;
   /**创建时间*/
   private java.sql.Timestamp createTime;
   /**最后登录时间*/
   private java.sql.Timestamp lastlogindate; 
   /**在线标识:不在数据记录,动态通过程序设置,1=在线,2=离线*/
   private java.lang.String online;
   /** 邮箱L*/
   private java.lang.String email;
   /** 头象 文件格式*/
   private java.lang.String fileType;
   /**会员附件*/
   private java.util.ArrayList<VipAnnex> vipAnnexList;
   /** 状态 0=正常,1=未删除,2=已删除,3=屏蔽 */
   private java.lang.String  state;
   
   private java.util.ArrayList idList;
   //columns END
   /** 相册  photolist  Json对象数组 */
   private java.util.ArrayList<VipAnnex> photolist;
   
   
	public VipMain(){
	}

	public VipMain(
		java.lang.Integer id
	){
		this.id = id;
	}
    
    public java.util.ArrayList<VipAnnex> getPhotolist() {
		return photolist;
	}

	public void setPhotolist(java.util.ArrayList<VipAnnex> photolist) {
		this.photolist = photolist;
	}
    
    public java.lang.String getState() {
		return state;
	}

	public void setState(java.lang.String state) {
		this.state = state;
	}

	public java.lang.String getPinyin4j() {
 	   if(null==this.pinyin4j||this.pinyin4j.length()==0)
		   return "A";
	   else
		   return this.pinyin4j;
	}

	public void setPinyin4j(java.lang.String pinyin4j) {
		this.pinyin4j = pinyin4j;
	}

	public java.lang.String getEmail() {
	 	   if(null==this.email||this.email.length()==0)
			   return "";
		   else
			   return this.email; 
	}

	public void setEmail(java.lang.String email) {
		this.email = email;
	}

	public java.lang.String getFileType() {
	 	   if(null==this.fileType||this.fileType.length()==0)
			   return "";
		   else
			   return this.fileType;  
	}

	public void setFileType(java.lang.String fileType) {
		this.fileType = fileType;
	}
	
    public java.sql.Timestamp getLastlogindate() {
		return lastlogindate;
	}

	public void setLastlogindate(java.sql.Timestamp lastlogindate) {
		this.lastlogindate = lastlogindate;
	}
	
	public java.lang.String getOnline() {
	 	if(null==this.online||this.online.length()==0)
			   return "";
		else
			   return this.online;
	}

	public void setOnline(java.lang.String online) {
		this.online = online;
	}

	public java.lang.String getFile() {
	 	if(null==this.file||this.file.length()==0)
			   return "";
		else
			   return this.file; 
	}

	public void setFile(java.lang.String file) {
		this.file = file;
	}

	public java.util.ArrayList<VipAnnex> getVipAnnexList() {
		return vipAnnexList;
	}

	public void setVipAnnexList(java.util.ArrayList<VipAnnex> vipAnnexList) {
		this.vipAnnexList = vipAnnexList;
	}

	public void setId(java.lang.Integer value) {
      this.id = value;
   }
   
   public java.lang.Integer getId() {
	 	if(null==this.id||this.id.toString().length()==0)
			   return 0;
		else
			   return this.id;
   }
   public void setMenberName(java.lang.String value) {
      this.menberName = value;
   }
   
   public java.lang.String getMenberName() {
	 	if(null==this.menberName||this.menberName.length()==0)
			   return "";
		else
			   return this.menberName; 
   }
   public void setMenberPass(java.lang.String value) {
      this.menberPass = value;
   }
   
   public java.lang.String getMenberPass() {
      return this.menberPass;
   }
   public void setImei(java.lang.String value) {
      this.imei = value;
   }
   
   public java.lang.String getImei() {
	 	if(null==this.imei||this.imei.length()==0)
			   return "";
		else
			   return this.imei;  
   }
   public void setElephant(java.lang.String value) {
      this.elephant = value;
   }
   
   public java.lang.String getElephant() {
	   if(null==this.elephant||this.elephant.length()==0)
		   return "";
	   else
		   return this.elephant;
   }
   public void setNickname(java.lang.String value) {
      this.nickname = value;
   }
   
   public java.lang.String getNickname() {
	   if(null==this.nickname||this.nickname.length()==0)
		   return "";
	   else
		   return this.nickname; 
   }
   public void setSex(java.lang.String value) {
      this.sex = value;
   }
   
   public java.lang.String getSex() {
	 	if(null==this.sex||this.sex.length()==0)
			   return "1";
		else
			   return this.sex;
   }
   public void setMood(java.lang.String value) {
      this.mood = value;
   }
   
   public java.lang.String getMood() {
	 	if(null==this.mood||this.mood.length()==0)
			   return "";
		else
			   return this.mood;
   }
   public void setConstellation(java.lang.String value) {
      this.constellation = value;
   }
   
   public java.lang.String getConstellation() {
	 	if(null==this.constellation||this.constellation.length()==0)
			   return "";
		else
			   return this.constellation;
   }
   public void setAge(java.lang.String value) {
      this.age = value;
   }
   
   public java.lang.String getAge() {
	 	if(null==this.age||this.age.length()==0)
			   return "1";
		else
			   return this.age;
   }
   public void setCredit(java.lang.Integer value) {
      this.credit = value;
   }
   
   public java.lang.Integer getCredit() {
	   if(null==this.credit||this.credit.toString().length()==0)
		   return 0;
	   else
		   return this.credit;
   }
   public void setRoses(java.lang.Integer value) {
      this.roses = value;
   }
   
   public java.lang.Integer getRoses() {
	   if(null==this.roses||this.roses.toString().length()==0)
		   return 0;
	   else
		   return this.roses; 
   }
   
   public java.lang.Integer getLogincount() {
	   if(null==this.logincount||this.logincount.toString().length()==0)
		   return 0;
	   else
		   return this.logincount; 
   }

   public void setLogincount(java.lang.Integer logincount) {
	this.logincount = logincount;
   }

   public String getCreateTimeString() {
      return date2String(getCreateTime(), FORMAT_CREATE_TIME);
   }
   
   public void setCreateTimeString(String value) {
      setCreateTime(string2Date(value, FORMAT_CREATE_TIME,java.sql.Timestamp.class));
   }
   
   public void setCreateTime(java.sql.Timestamp value) {
      this.createTime = value;
   }
   
   public java.sql.Timestamp getCreateTime() {
      return this.createTime;
   }

   public java.util.ArrayList getIdList() {
      return idList;
   }

   public void setIdList(java.util.ArrayList idList) {
      this.idList = idList;
   }

    /**手动增加属性后,toString,hashCode,equals都要修改*/
   public String toString() {
      return new ToStringBuilder(this)
         .append("Id",getId())
         .append("MenberName",getMenberName())
         .append("MenberPass",getMenberPass())
         .append("Imei",getImei())
         .append("Elephant",getElephant())
         .append("Nickname",getNickname())
         .append("Sex",getSex())
         .append("Mood",getMood())
         .append("Constellation",getConstellation())
         .append("Age",getAge())
         .append("Credit",getCredit())
         .append("Roses",getRoses())
         .append("Logincount",getLogincount())
         .append("Lastlogindate",getLastlogindate())
         .append("CreateTime",getCreateTime())
         .append("File",getFile())
         .toString();
   }
   
   public int hashCode() {
      return new HashCodeBuilder()
         .append(getId())
         .append(getMenberName())
         .append(getMenberPass())
         .append(getImei())
         .append(getElephant())
         .append(getNickname())
         .append(getSex())
         .append(getMood())
         .append(getConstellation())
         .append(getAge())
         .append(getCredit())
         .append(getRoses())
         .append(getLogincount())
         .append(getCreateTime())
         .append(getLastlogindate())
         .append(getFile())
         .toHashCode();
   }
   
   public boolean equals(Object obj) {
      if(obj instanceof VipMain == false) return false;
      if(this == obj) return true;
      VipMain other = (VipMain)obj;
      return new EqualsBuilder()
         .append(getId(),other.getId())
         .append(getMenberName(),other.getMenberName())
         .append(getMenberPass(),other.getMenberPass())
         .append(getImei(),other.getImei())
         .append(getElephant(),other.getElephant())
         .append(getNickname(),other.getNickname())
         .append(getSex(),other.getSex())
         .append(getMood(),other.getMood())
         .append(getConstellation(),other.getConstellation())
         .append(getAge(),other.getAge())
         .append(getCredit(),other.getCredit())
         .append(getRoses(),other.getRoses())
         .append(getLastlogindate(),other.getLastlogindate())
         .append(getLogincount(),other.getLogincount())
         .append(getCreateTime(),other.getCreateTime())
         .append(getFile(),other.getFile())
         .isEquals();
   }
}

